package org.jc.oss.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import jakarta.annotation.Resource;
import org.jc.oss.service.StorageService;
import org.jc.oss.util.MinioUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 功能描述
 *
 * @author wanghongqian
 * @date 2024/07/04 15:29
 */

@RestController
@RequestMapping("/minio")
public class FileController {

    @Resource
    private StorageService storageService;

    @Value(value = "${storage.service.type}")
    private String storage;


    @GetMapping("/test")
    public List<String> test() throws Exception {
        return storageService.getAllBucket();
    }
}
